-- GENERATED SPELL FOR [Bound Air Elemental] --


function spell0_30418(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(46150,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30418', 2000, 1)
end

function spell1_30418(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(59152,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30418', 2000, 1)
end

function spell2_30418(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(22414,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30418', 2000, 1)
end

function spell3_30418(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(59169,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30418', 2000, 1)
end

function Sorts_30418(pUnit, Event)
local choix_sorts_30418 = math.random(0, 3)
if choix_sorts_30418 == 0 then
pUnit:RegisterEvent('spell0_30418', 1, 1)
end
if choix_sorts_30418 == 1 then
pUnit:RegisterEvent('spell1_30418', 1, 1)
end
if choix_sorts_30418 == 2 then
pUnit:RegisterEvent('spell2_30418', 1, 1)
end
if choix_sorts_30418 == 3 then
pUnit:RegisterEvent('spell3_30418', 1, 1)
end
end

function mob30418_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30418', math.random(1500, 3000), 1)
end

function mob30418_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30418_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30418_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30418, 1, 'mob30418_Action')
RegisterUnitEvent(30418, 2, 'mob30418_Leave')
RegisterUnitEvent(30418, 3, 'mob30418_Kill')
RegisterUnitEvent(30418, 4, 'mob30418_Die')
